﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.Article.ViewModels;
@using MvcMall.Framework.MvcPager;
@using MvcMall.AdminPortal.Controllers.GoodsCategory.ViewModels;
@using MvcContrib.UI.Grid;
@model PagedList<ArticleModel>
<!DOCTYPE html>
<html>
<head>
    <title>文章管理</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
</head>
<body>
    <div id="pageList">
        <script type="text/javascript">
            $(function () {
                $("#tabs").tabs({
                    cache: false
                });
            });  
        </script>
        <div id="tabs">
            <ul>
                <li><a href="#menuList">文章管理</a> </li>
            </ul>
            <div id="menuList">
                <table width="100%">
                    <tr>
                        <th>
                            文章ID
                        </th>
                        <th>
                            标题
                        </th>
                        <th>
                            文章类别
                        </th>
                        <th>
                            前端是否显示
                        </th>
                        <th>
                            排序
                        </th>
                        <th>
                            创建时间
                        </th>
                        <th>
                        </th>
                    </tr>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @item.ArticleId
                            </td>
                            <td>
                                @item.Title
                            </td>
                            <td>
                                @item.ArticleCategoryIdName
                            </td>
                            <td>
                                @(item.IsShow ? "是" : "否")
                            </td>
                            <td>
                                @item.SortOrder
                            </td>
                            <td>
                                @item.CreateTime
                            </td>
                            <td>
                                @Html.ActionLink("修改", "Save", new { @menuId = item.ArticleId })
                            </td>
                        </tr>
                    }
                </table>
                @Html.AjaxPager(Model, new AjaxOptions { UpdateTargetId = "pageList" })
            </div>
        </div>
    </div>
</body>
</html>
